<template>
  <div>
    <el-divider />
    <h4>eye-Movement评分量表</h4>
    <el-form ref="form" :model="form" label-width="100px">
      <el-form-item label="得分">
        <el-input v-model="score" style="width:200px" disabled />
      </el-form-item>
      <el-form-item label="左眼向上:">
        <el-radio-group v-model="form.eyeMovements1">
          <el-radio :label="0">正常</el-radio>
          <el-radio :label="1">活动度大于50%</el-radio>
          <el-radio :label="2">活动度小于50%</el-radio>
          <el-radio :label="3">固定</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="左眼向下:">
        <el-radio-group v-model="form.eyeMovements2">
          <el-radio :label="0">正常</el-radio>
          <el-radio :label="1">活动度大于50%</el-radio>
          <el-radio :label="2">活动度小于50%</el-radio>
          <el-radio :label="3">固定</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="左眼向左:">
        <el-radio-group v-model="form.eyeMovements3">
          <el-radio :label="0">正常</el-radio>
          <el-radio :label="1">活动度大于50%</el-radio>
          <el-radio :label="2">活动度小于50%</el-radio>
          <el-radio :label="3">固定</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="左眼向右:">
        <el-radio-group v-model="form.eyeMovements4">
          <el-radio :label="0">正常</el-radio>
          <el-radio :label="1">活动度大于50%</el-radio>
          <el-radio :label="2">活动度小于50%</el-radio>
          <el-radio :label="3">固定</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="右眼向上:">
        <el-radio-group v-model="form.eyeMovements5">
          <el-radio :label="0">正常</el-radio>
          <el-radio :label="1">活动度大于50%</el-radio>
          <el-radio :label="2">活动度小于50%</el-radio>
          <el-radio :label="3">固定</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="右眼向下">
        <el-radio-group v-model="form.eyeMovements6">
          <el-radio :label="0">正常</el-radio>
          <el-radio :label="1">活动度大于50%</el-radio>
          <el-radio :label="2">活动度小于50%</el-radio>
          <el-radio :label="3">固定</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="右眼向左:">
        <el-radio-group v-model="form.eyeMovements7">
          <el-radio :label="0">正常</el-radio>
          <el-radio :label="1">活动度大于50%</el-radio>
          <el-radio :label="2">活动度小于50%</el-radio>
          <el-radio :label="3">固定</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="右眼向右:">
        <el-radio-group v-model="form.eyeMovements8">
          <el-radio :label="0">正常</el-radio>
          <el-radio :label="1">活动度大于50%</el-radio>
          <el-radio :label="2">活动度小于50%</el-radio>
          <el-radio :label="3">固定</el-radio>
        </el-radio-group>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        eyeMovements1: 0,
        eyeMovements2: 0,
        eyeMovements3: 0,
        eyeMovements4: 0,
        eyeMovements5: 0,
        eyeMovements6: 0,
        eyeMovements7: 0,
        eyeMovements8: 0,
        pId: this.pId,
        id: ''
      }
    }
  },
  inject: [
    'pId'
  ],
  computed: {
    score() {
      var sum = Object.values(this.form).reduce((x, y) => x + y)
      return sum
    }
  }
}
</script>

<style>

</style>
